import axios from '@/api/fetch';
import SERVER from '@/api/server';
// 主页-获取自定义提醒列表
export const getInfo = params =>
  axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/cust/remind/getInfo`, {
    params
  });
// 新增查询购车客户查询
export const queryOVinfo = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/customerCare/ownerVehicleManagement/queryOVinfo`, {
    params
  });
// 新增保存
export const save = params => axios.post(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/cust/remind/save`, params);

export const getInfoById = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/cust/remind/getInfoById`, { params });
// 新增保存
// export const careSave = params => axios.post(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/cust/remind/careSave`, params);

export const saveRemind = params => axios.post(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/cust/remind/careSave`, params);

``;
// 定期保养首页查询
export const getMaintenanceRemindTable = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/solicitude`, { params });
// 获取维修建议备件
export const getAdvicePart = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMER}/customer/adviceQuery/part`, { params });
// 导出维修建议项目
export const exportLabour = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMER}/customer/adviceQuery/export`, params);
// 到处维修建议备件
export const exportPart = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMER}/customer/adviceQuery/export`, params);
// 获取经销商
export const getDealerCode = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMER}/customer/adviceQuery/DealerCode`, { params });
// 获取品牌
export const getbrandsdictList = params => axios.get(`${SERVER.DMS_WEB}/manage/rest/basedata/brandsdict`, { params });
// 获取车系
export const getselectSeriesList = params => axios.get(`${SERVER.DMS_WEB}/manage/rest/basedata/selectSeries`, { params });
// 获取车型
export const getselectModelList = params => axios.get(`${SERVER.DMS_WEB}/manage/rest/basedata/selectModel`, { params });
// 获取部门
export const getMaintainAdvisorList = params => axios.get(`${SERVER.DMS_WEB}/customer/rest/customer/solicitude/MaintainAdvisor`, { params });
// 获取保险
export const getinsuranceTypeNameList = params => axios.get(`${SERVER.DMS_WEB}/customer/rest/customer/insurance/insuranceTypeName`, { params });
// 获取保险月
export const getinsuranceMonthkyList = params => axios.get(`${SERVER.DMS_WEB}/customer/rest/customer/insurance/insuranceMonthky`, { params });
// 获取保险日
export const getinsuranceDaykyList = params => axios.get(`${SERVER.DMS_WEB}/customer/rest/customer/insurance/insuranceDayky`, { params });

// 保险信息查询
export const getinsuranceList = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/insuranceRemind`, { params });
// 品牌 - 下拉框
export const getPinpSelect = params => axios.get(`/api/basedata/vehicleProduct/brandsqueryall`, { params });
// 服务顾问 - 下拉框
export const getUserListSelect = params => axios.get(`/api/sysManage/basedata/users/getUserListByRole?role=10071011`, { params });

// 提醒录入保存
export const addRemind = params => axios.post(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customer/remindContent/addRemind`, params);

//  问卷查询
export const questionPag = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customerManage/questionnaire/record`, { params });

// 问卷录入保存
export const addQuestion = params => axios.post(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customerCare/activityVisitResult/save`, params);

// 上次回访查询
export const getLastInfo = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customerCare/activityVisitResult/getLastInfo`, { params });

//  查询车主车辆信息
// export const getCustomerVehicleInfo = params => axios.post(`${SERVER.DMSCLOUD_REPAIR}/vehicleOwnerInfo/getVehicleInfo/List`, params);
export const getCustomerVehicleInfo = params => axios.get(`${SERVER.DMSCLOUD_REPAIR}/customerVehicleInfo/getOwnerVehicleInfo/getOwnerVehicleInfoForReturnVisit`, { params });

export const batchAddQuestion = params => axios.post(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customerCare/activityVisitResult/batchAddQuestion`, { params });

export const getActivityEntryVisitResultNews = params => axios.get(`${SERVER.DMSCLOUD_CUSTOMERREPAIR}/customerCare/activityVisitResult/getActivityEntryVisitResultNews`, { params });
